package com.disgnpattern.learn.chapter6;

/**
 * @author dxy
 * @version 1.0
 * @date 2021/10/21 16:52
 * @decripton 测试
 * @mail victorydeng@163.com
 */
public class DecorateTest {
    public static void main(String[] args) {
        Person person = new Person("小邓");
        System.out.println("第一种装扮:");
        Sneakers sneakers = new Sneakers();
        BigTrouser bigTrouser = new BigTrouser();
        TShirts tShirts = new TShirts();
        sneakers.decorate(person);
        bigTrouser.decorate(sneakers);
        tShirts.decorate(bigTrouser);
        tShirts.show();

        System.out.println("第二种装扮:");
        LeatherShoes leatherShoes = new LeatherShoes();
        Tie tie = new Tie();
        Suit suit = new Suit();
        leatherShoes.decorate(person);
        tie.decorate(leatherShoes);
        suit.decorate(tie);
        suit.show();
    }
}
